package com.thinkTank.oa.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkTank.oa.base.BaseServiceImpl;
import com.thinkTank.oa.dao.ConfOfAttrMapper;
import com.thinkTank.oa.entity.ConfOfAttr;
import com.thinkTank.oa.entity.Conference;
import com.thinkTank.oa.entity.Person;
import com.thinkTank.oa.service.ConOfAttrService;

@Transactional
@Service("ConOfAttrService")
public class ConOfAttrServiceImpl extends BaseServiceImpl<ConfOfAttr> implements ConOfAttrService {

	@Autowired
	private ConfOfAttrMapper confOfAttrMapper;

	public ConfOfAttrMapper getConferenceMapper() {
		return (ConfOfAttrMapper) super.getBaseMapper();
	}

	@Autowired
	public void setConferenceMapper(ConfOfAttrMapper conOfAttrMapper) {
		super.setBaseMapper(conOfAttrMapper);
	}

	@Override
	public List<ConfOfAttr> findAttrByPersonId(String personId) {
		return confOfAttrMapper.findAttrByPersonId(personId);
	}

	@Override
	public void deleteAttrByPersonId(ConfOfAttr attr) {
		confOfAttrMapper.deleteAttrByPersonId(attr);
	}

	@Override
	public void deleteProjectByConferenceId(String conferenceId) {
		confOfAttrMapper.deleteProjectByConferenceId(conferenceId);
		
	}

	@Override
	public void deleteCustomerByConferenceId(String conferenceId) {
		confOfAttrMapper.deleteCustomerByConferenceId(conferenceId);
		
	}

	@Override
	public List<ConfOfAttr> findAttrCustomerByConfId(String conferenceId) {
		return confOfAttrMapper.findAttrCustomerByConfId(conferenceId);
	}

	@Override
	public List<ConfOfAttr> findAttrProjectByConfId(String conferenceId) {
		return confOfAttrMapper.findAttrProjectByConfId(conferenceId);
	}

	@Override
	public List<ConfOfAttr> findAttrPersonByConfId(String conferenceId) {
		// TODO Auto-generated method stub
		return confOfAttrMapper.findAttrPersonByConfId(conferenceId);
	}

	@Override
	public ConfOfAttr findProjectByConfIdAndProjectId(ConfOfAttr attr) {
		return confOfAttrMapper.findProjectByConfIdAndProjectId(attr);
	}

	@Override
	public void deleteAttrByProjectId(ConfOfAttr attr) {
		
		confOfAttrMapper.deleteAttrByProjectId(attr);
	}

	@Override
	public void deleteAttrByCustomerId(ConfOfAttr attr) {
		confOfAttrMapper.deleteAttrByCustomerId(attr);
	}

	@Override
	public List<ConfOfAttr> findAttrByCustomerId(String customerId) {
		return confOfAttrMapper.findAttrByCustomerId(customerId);
	}

	@Override
	public List<ConfOfAttr> queryAllAndCustomerNoIn(String conferenceId) {
		// TODO Auto-generated method stub
		return confOfAttrMapper.queryAllAndCustomerNoIn(conferenceId);
	}

	@Override
	public List<ConfOfAttr> queryAllAndProjectNoIn(String conferenceId) {
		// TODO Auto-generated method stub
		return confOfAttrMapper.queryAllAndProjectNoIn(conferenceId);
	}

	@Override
	public List<ConfOfAttr> queryAllAndPersonNoIn(String conferenceId) {
		// TODO Auto-generated method stub
		return confOfAttrMapper.queryAllAndPersonNoIn(conferenceId);
	}

	@Override
	public List<Person> queryPersonList(String confereceId) {
		// TODO Auto-generated method stub
		return confOfAttrMapper.queryPersonList(confereceId);
	}
	
	/**
	 * 通过专家pid联合查询会议
	 * @author dongli
	 * @date 2018年10月22日
	 * @param personId
	 * @return
	 */
	public List<Conference> queryConferenceList(String personId){
		return confOfAttrMapper.queryConferenceList(personId);
	}
	
}
